<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>APP</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
</head>
<style type="text/css">
.aui-content {
    background: #ffffff;
    overflow: hidden;
    padding: 15px;
}
p {
    margin: 10px 0;
    overflow: hidden;
}

</style>
<body>
    <div class="aui-content">
        <p>带有提示的滑块：<span id="value-1">30</span></p>
        <div class="aui-range" style="margin-top:30px;">
            <input type="range" class="aui-range-danger" value="30" max="100" min="1" step="1" id="range" />
        </div>
    </div>
    <div class="aui-content">
        <p>带有提示的滑块：<span id="value-2">40</span></p>
        <div class="aui-range" style="margin-top:30px;">
            <input type="range" value="40" max="100" min="1" step="1" id="range2" />
        </div>
    </div>
    <div class="aui-content">
        <p>普通滑块：<span id="value">50</span></p>
        <div class="aui-range"><input type="range" value="50" max="100" min="1" class="aui-range-primary" id="demo" /></div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript" src="../script/aui-range.js" ></script>
<script type="text/javascript">
var range = new auiRange({
    element:document.getElementById("range")
},function(ret){
    document.getElementById("value-1").textContent = ret.value;
})
var range2 = new auiRange({
    element:document.getElementById("range2")
},function(ret){
    document.getElementById("value-2").textContent = ret.value;
})
document.getElementById("demo").addEventListener("change",function(){
    document.getElementById("value").textContent = this.value;
});

</script>
</html>